package com.job.zhaokaiqiang;

import java.util.Scanner;

/**
 * @author DELL
 * @version 1.0
 * @since 2022-07-11 21:27:18
 */
public class Yanghuisanjiao {
    public static void main(String[] args) {
        System.out.println("输入你想打印的行数");
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int [][]a = new int[n][n];
        int i,j;
        a[0][0]=1;
        for(i=1;i<n;i++)
        {
            for(j=0;j<n;j++)
            {
                    if(j==0||j==i){
                    a[i][j]=1;}
                    else{
                        a[i][j]=a[i-1][j]+a[i-1][j-1];
                    }

            }
        }
        for(i=0;i<n;i++)
        {
            for(j=0;j<=i;j++)
            {
                System.out.print(a[i][j]+"\t");
            }
            System.out.println();
        }
    }
}
